#include <iostream>
#include "../CMarkup.h"

using namespace std;

int main(int argc, char** argv)
{
	CMarkup* Markup = new CMarkup("channel", "<url>http://www.pcinpact.com/images/page/logo88x31.gif</url>\n<title>PC INpact</title>\n<link>http://www.pcinpact.com</link>");
	Markup->AddSubMarkup(new CMarkup("url", "http://www.pcinpact.com/images/page/logo88x31.gif"));
	Markup->AddSubMarkup(new CMarkup("title", "PC Inpact"));
	Markup->AddSubMarkup(new CMarkup("link", "http://www.pcinpact.com"));

	cout << "Markup CHannel :" << endl << Markup->toString() << endl;

	cout << "Nombre de subNodes (Attendu : 3) = " << Markup->getSubMarkupCount() << endl;
	for(int i = 0; i < Markup->getSubMarkupCount(); i++)
	{
		cout << "Affichage de la " << i << "ème subnode :" << endl;
		cout << Markup->GetSubMarkup(i)->toString();
	}

}
